#ifndef __PXE_H_
#define __PXE_H_

#include "type.h"
#include "pxe_cmn.h"

struct pxe {
	uint8	Signature[4];
	uint8	StructLength;
	uint8	StructCksum;
	uint8	StructRev;
	uint8	reserved1;

	struct undi_romid __FAR *UNDI;
	struct bc_romid __FAR	*Base;
	uint16 (__FAR __CDECL *EntryPointSP)(uint16 func, void __FAR *param);
	uint16 (__FAR __CDECL *EntryPointESP)(uint16 func, void __FAR *param);
	uint32	reserved3;
	uint8	reserved2;
	uint8	SegDescCnt;
	uint16	FirstSelector;

	struct newsegdesc	Stack;
	struct newsegdesc	UNDIData;
	struct newsegdesc	UNDICode;
	struct newsegdesc	UNDICodeWrite;
	struct newsegdesc	BC_Data;
	struct newsegdesc	BC_Code;
	struct newsegdesc	BC_CodeWrite;
};

struct pxenv {
	char	Signature[6];
	uint16	Version;
	uint8	StructLength;
	uint8	StructCksum;

	uint32	RMEntry;
	uint32	PMEntryOff;
	uint16	PMEntrySeg;

	uint16	StackSeg;
	uint16	StackSize;

	uint16	BaseCodeSeg;
	uint16	BaseCodeSize;

	uint16	BaseDataSeg;
	uint16	BaseDataSize;

	uint16	UNDIDataSeg;
	uint16	UNDIDataSize;
	uint16	UNDICodeSeg;
	uint16	UNDICodeSize;

	struct pxe __FAR *RuntimePtr;
};

#endif

